package mysql

import "gorm.io/gorm"

type Medicine struct {
	gorm.Model
	Name     string `gorm:"type:varchar(100)"`
	Num      string `gorm:"type:varchar(100)"`
	Quantity int    `gorm:"type:int(100)"`
	Price    int    `gorm:"type:int(100)"`
	UserId   int    `gorm:"type:int(100)"`
}

func (m *Medicine) MedicineAdd(db *gorm.DB) error {
	return db.Create(m).Error
}
